 <%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8"  %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="my" %>
<%@page session="true"%>

    <html>  
  <fmt:message var="title" key="admin.title"/>
 <my:layout title="${title}">   
      <jsp:attribute name="body">

  
        <c:url value="/logout" var="logoutUrl" />

        <!-- csrt support -->
        <form action="${logoutUrl}" method="post" id="logoutForm">
            <input type="hidden" 
                   name="${_csrf.parameterName}"
                   value="${_csrf.token}" />
        </form>

        <script>
            function formSubmit() {
                document.getElementById("logoutForm").submit();
            }
        </script>

        <c:if test="${pageContext.request.userPrincipal.name != null}">
            <h2>
                <f:message key="admin.welcome"/> : ${pageContext.request.userPrincipal.name} | <a
                    href="javascript:formSubmit()">     <f:message key="admin.logout"/></a>
            </h2>
        </c:if>


   </jsp:attribute>
 </my:layout>
</html>